def show_stat(document:str , keys = 2 , sentences = 2):
    """
        测试速度单个字符
    """

    print("Document:\n", document)

    start = time.time()

    print("\nKey Word:",HanLP.extractKeyword(document, keys))

    print("\nAbstract Setences: ",HanLP.extractSummary(document, sentences))

    total_t = time.time() - start

    print("\nText len : {}  , Consuming {} ms ".format( len(document) ,total_t*1000 ))


def get_file_suffix(file):
    """
        其实这个函数是多余的，但是先保留
        在python判断还是cpp里面判断
    """
    #  return ['doc' , 'pdf , txt]
    import os 

    file_suffix= os.path.splitext(file)[-1]
    
    if file_suffix == '.docx':
        file_type = 'doc'
    elif file_suffix =='.pdf':
        file_type = 'pdf'
    elif file_suffix == '.txt':
        file_type = 'txt'
    else:
        raise "Eorr not supported file type!"
    return file_type
        